<?php defined('SYSPATH') or die('No direct script access.');

class Library_User {
	public static function findAll() {
		return ORM::factory('user')
			->select('user_profiles.*')
			->join('user_profiles')
			->on('users.profile_id','=', 'user_profiles.id')
			->find_all();
	}

	public static function findOne($id) {
		return ORM::factory('user', $id)
			->select('user_profiles.*')
			->join('user_profiles')
			->on('users.profile_id','=', 'user_profiles.id')
			->find();
	}
}
?>
